package com.zhb.designmode.creationmode.prototype.deepcoding;

public class Phone implements Cloneable{
    private String name;
    private Integer price;

    public Phone(String name, Integer price) {
        this.name = name;
        this.price = price;
    }

    @Override
    public String toString() {
        return "Phone{" +
                "name='" + name + '\'' +
                ", price=" + price +
                '}';
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        Phone clone = (Phone) super.clone();
        return clone;
    }
}
